package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.Container;
import org.akomantoso.core.data.Formula;
import org.akomantoso.core.data.LongTitle;
import org.akomantoso.core.data.group.PrefaceContainers;
import org.akomantoso.core.io.util.Instantiator;

public final class PrefaceContainersGroup {

	private PrefaceContainersGroup() {
	}

	public static final Map<String, Instantiator<PrefaceContainers>> MAP;

	static {

		Map<String, Instantiator<PrefaceContainers>> temp = new HashMap<String, Instantiator<PrefaceContainers>>();

		// container
		temp.put(Container.ELEMENT, new Instantiator<PrefaceContainers>() {
			public Container instantiate() {
				return new Container();
			}
		});

		// longTitle
		temp.put(LongTitle.ELEMENT, new Instantiator<PrefaceContainers>() {
			public LongTitle instantiate() {
				return new LongTitle();
			}
		});

		// formula
		temp.put(Formula.ELEMENT, new Instantiator<PrefaceContainers>() {
			public Formula instantiate() {
				return new Formula();
			}
		});

		MAP = Collections.unmodifiableMap(temp);

	}
}
